package com.woniu.project.client;

import com.woniu.project.core.dto.ResultDto;
import com.woniu.project.params.productbrand.ProductBrandAddParam;
import com.woniu.project.params.productbrand.ProductBrandSelectParam;
import com.woniu.project.params.productbrand.ProductBrandUpdateParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(name = "product-server")
public interface ProductBrandClient {
    //根据是否有name进行分页查询
    @GetMapping("/pawn/product/productBrand/select")
    public ResultDto select(@RequestBody ProductBrandSelectParam productBrandSelectParam) ;
    //新增商品品牌
    @PostMapping("/pawn/product/productBrand/addBrand")
    public ResultDto addBrand(@Valid @RequestBody ProductBrandAddParam productBrandAddParam) ;
    //修改商品品牌
    @PutMapping("/pawn/product/productBrand/updateBrand")
    public ResultDto updateBrand(@Valid @RequestBody ProductBrandUpdateParam productBrandUpdateParam) ;
    //根据id删除品牌
    @DeleteMapping("/pawn/product/productBrand/deleteById/{id}")
    public ResultDto deleteById(@PathVariable Integer id);
}
